We need to make certain that we do not look at this passage in Zechariah through the eyes of our understanding of the death of Jesus/Yeshua.
Listen for that voice inside your head that is saying, "if you understand Zechariah in such-and-such a way, then look at the implications that will have on your understanding of the nature of Jesus".
Look solely at the local, immediate and direct meaning of the passage, ignoring what John wrote later. His was the last "gospel" written, and was the first to make use of this passage from Zechariah.
Jesus' disciples were faced with the reality that their Leader, instead of leading them as the Messiah to overthrow the Roman overlord had instead been put to death by the Romans. How could they make sense of this? What they did was, as Paul wrote, was to "search the [Hebrew] Scriptures".
In the process, the Christian writers mangled passages to produce stories and explanations that satisfied their concerns. The Jews complained that they were misusing passages that were intended for Jews living at an earlier time. (This developing animosity, in turn, resulted in the later NT writers inserting anti-Semitic sentiments - "his blood be on us and on our children".)
Passages such as this one in Zechariah had an immediate and local application, yet were reworked into stories composed of similarly manipulated texts from the Hebrew Scriptures.
If you do not find those thoughts too challenging and are not frightened to investigate challenging ideas, then I invite you to read a chapter from a book which I have uploaded to:
http://www.jwstudies.com/Spong__Jesus_for_the_Non-religious.pdf
Doug